package String;

/**
 * length()方法：获取字符串长度
 */
public class LengthDemo {
    public static void main(String[] args) {
        String str = "Hello World";
        System.out.println(str.length());

        String str2 = " ";
        System.out.println(str2.length());
    }
}
